home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Controls / Visual Basic Controls.iso / vbcontrol / hypernav / form1.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1999-03-20  |  3.8 KB  |  132 lines

  1. VERSION 5.00
  2. Object = "{398EA325-39E8-11D1-ACBD-0080C7316F20}#1.2#0"; "HyperNav.ocx"
  3. Begin VB.Form Form1 
  4.    Caption         =   "HyperNavigation Control Sample"
  5.    ClientHeight    =   4245
  6.    ClientLeft      =   1650
  7.    ClientTop       =   1620
  8.    ClientWidth     =   4005
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   4245
  11.    ScaleWidth      =   4005
  12.    Begin VB.ComboBox Combo1 
  13.       Height          =   315
  14.       ItemData        =   "Form1.frx":0000
  15.       Left            =   120
  16.       List            =   "Form1.frx":0010
  17.       Style           =   2  'Dropdown List
  18.       TabIndex        =   8
  19.       Top             =   3240
  20.       Width           =   2175
  21.    End
  22.    Begin VB.CommandButton cmdRefresh 
  23.       Caption         =   "Refresh"
  24.       Height          =   375
  25.       Left            =   2520
  26.       TabIndex        =   5
  27.       Top             =   2760
  28.       Width           =   1290
  29.    End
  30.    Begin VB.CommandButton cmdGoDesktop 
  31.       Caption         =   "Go Desktop"
  32.       Height          =   375
  33.       Left            =   2520
  34.       TabIndex        =   4
  35.       Top             =   1560
  36.       Width           =   1290
  37.    End
  38.    Begin VB.CommandButton cmdGoForward 
  39.       Caption         =   "Go Forward"
  40.       Height          =   375
  41.       Left            =   2520
  42.       TabIndex        =   3
  43.       Top             =   1080
  44.       Width           =   1290
  45.    End
  46.    Begin VB.CommandButton cmdGoBack 
  47.       Caption         =   "Go Back"
  48.       Height          =   375
  49.       Left            =   2520
  50.       TabIndex        =   2
  51.       Top             =   600
  52.       Width           =   1290
  53.    End
  54.    Begin HyperNavigationCtl.HyperNavigation HyperNav1 
  55.       Height          =   2535
  56.       Left            =   120
  57.       TabIndex        =   1
  58.       Top             =   600
  59.       Width           =   2175
  60.       _ExtentX        =   3836
  61.       _ExtentY        =   4471
  62.    End
  63.    Begin VB.DriveListBox Drive1 
  64.       Height          =   315
  65.       Left            =   120
  66.       TabIndex        =   0
  67.       Top             =   120
  68.       Width           =   2175
  69.    End
  70.    Begin VB.Label lblClicked 
  71.       AutoSize        =   -1  'True
  72.       Height          =   195
  73.       Left            =   120
  74.       TabIndex        =   7
  75.       Top             =   3960
  76.       Width           =   45
  77.    End
  78.    Begin VB.Label lblPath 
  79.       AutoSize        =   -1  'True
  80.       Height          =   195
  81.       Left            =   120
  82.       TabIndex        =   6
  83.       Top             =   3720
  84.       Width           =   45
  85.    End
  86. Attribute VB_Name = "Form1"
  87. Attribute VB_GlobalNameSpace = False
  88. Attribute VB_Creatable = False
  89. Attribute VB_PredeclaredId = True
  90. Attribute VB_Exposed = False
  91. Private Sub cmdGoBack_Click()
  92. 'go back.
  93. HyperNav1.GoBack
  94. End Sub
  95. Private Sub cmdGoDesktop_Click()
  96. 'set the path of HyperNavigation control to
  97. 'the current Windows Desktop.
  98. HyperNav1.GoDesktop
  99. End Sub
  100. Private Sub cmdGoForward_Click()
  101. 'go forward.
  102. HyperNav1.GoForward
  103. End Sub
  104. Private Sub cmdRefresh_Click()
  105. 'refresh the HyperNavigation control.
  106. HyperNav1.Refresh
  107. End Sub
  108. Private Sub Combo1_Click()
  109. 'set the new pattern.
  110. HyperNav1.Pattern = Combo1.List(Combo1.ListIndex)
  111. 'refresh the HyperNavigation control.
  112. HyperNav1.Refresh
  113. End Sub
  114. Private Sub Drive1_Change()
  115. 'change the path.
  116. HyperNav1.Path = Left(Drive1.Drive, 2) & "\"
  117. End Sub
  118. Private Sub Form_Load()
  119. 'set the initial path.
  120. HyperNav1.Path = Drive1.Drive & "\"
  121. 'set the default pattern (*.*).
  122. Combo1.ListIndex = 0
  123. End Sub
  124. Private Sub HyperNav1_Click(ByVal FileName As String)
  125. 'show which item was clicked.
  126. lblClicked.Caption = "Clicked: " & FileName
  127. End Sub
  128. Private Sub HyperNav1_PathChanged(ByVal NewPath As String, ByVal OldPath As String)
  129. 'show the current path.
  130. lblPath.Caption = "Path: " & NewPath
  131. End Sub
  132.